package com.cyw.common.domain.dto;

import com.cyw.common.utils.DateUtils;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * @Author:cyw
 * @CreateTime: 2021/3/31 11:33
 **/
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class DateInfo implements Serializable {

    private static final long serialVersionUID = 6526943123265163559L;

    private LocalDate date;

    /**
     * 周一~周日 该值 0-6
     */
    private Integer weekIndex;

    public DateInfo calWeekIndex() {
        this.weekIndex = DateUtils.getWeekIndex(this.date);
        return this;
    }
}

    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    